Skip to content

Conversation

eshanrnh
Copy link
Contributor

@eshanrnh eshanrnh commented May 7, 2025

Description

Based on customer feedback, the article is missing information on how to abort subsequent Workflows through the use of Rejected record state. Added a section with some info and an example.

Type of suggestion

  • Typo/grammar fix
  • Updated outdated content
  • New content
  • Updates related to a new version
  • Other

Product & version (if relevant)

Forms v10, 13, 14, 15, 16

Deadline (if relevant)

Anytime

Copy link
Contributor

@sofietoft sofietoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Content-wise, it looks great to me 💪

Consider getting a Forms expert (like Ronald), to give a code review.

@eshanrnh eshanrnh requested a review from ronaldbarendse May 9, 2025 07:19
@eshanrnh
Copy link
Contributor Author

eshanrnh commented May 9, 2025

@ronaldbarendse can you please go through the code in the PR and let me know if something looks off?

@eshanrnh
Copy link
Contributor Author

@ronaldbarendse Gentle reminder.

Copy link
Contributor

@ronaldbarendse ronaldbarendse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A long overdue comment: I haven't been able to exactly replicate the behavior documented here. All workflows will be executed by default on either submission or approval, regardless of whether one of them failed or sets the record state to rejected. However, once e.g. all submission workflows have executed and one of them sets the record state to rejected, the approval workflows will indeed be skipped (there's no need to return a failed workflow execution status though).

It is possible to add a condition to a workflow to skip execution based on a field value, but that would require 'abusing' a (hidden) field and populating it within another workflow. I wouldn't recommend this though and suggest inheriting the workflow you want to conditionally skip instead to add the conditional logic inside the ExecuteAsync() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants